<template>
	<view class="box">
		<view class="title">{{datailData.title}}</view>
		<view class="time">{{datailData.create_at}}</view>
	    <view>
			<image :src="datailData.image" mode="" class="img" mode="widthFix"></image>
		</view>
		<view class="cont" v-html="datailData.content"></view>
		
	</view>
</template>

<script>
	import util from '../../static/util.js'
	export default {
		data() {
			return {
				imgUrl:util.globalData.imgPre,
				id:'',
				datailData:'',
			};
		},
		onLoad(opt){
			console.log(opt)
			this.id=opt.id;
			this.getArticleDetail()
		},
		methods: {
		   
		   getArticleDetail(){
			   var that=this;
			   that.ajax({
			   	url:'api/article/getArticleDetail',
				data:{
					article_id:that.id
				},
			   	success:function(res){
			   		that.datailData=res.data;
			   	}
			   })
		   },
		 
		}
	}
</script>

<style lang="less" scoped >
.box{
	padding: 30rpx;
}
.title{
	font-size: 36rpx;
	text-align: center;
	font-weight: 600;
}
.time{
	text-align: right;
	font-size: 24rpx;
	color: #666666;
	
}
.img{
	width: 100%;
	padding-top: 15rpx;
	padding-bottom: 15rpx;
}
.cont{
	overflow: hidden;
}
.cont /deep/  img{
	width: 100%!important;
	display: block!important;
}
</style>
